/******************************************************
MN88472.h
----------------------------------------------------
Demodulator IC control functions				

<Revision History>
'12/03/02 : OKAMOTO	Sepalate "Register Setting Array" to Xtal 20.48MHz and 20.5MHz.
'12/01/18 : OKAMOTO	Implement IF 4MHz for DVB-T 6MHz.
'12/01/18 : OKAMOTO	Implement IF 4MHz for DVB-T2 6MHz.
'11/10/24 : OKAMOTO	Update to "MN88472_Device_Driver_111012"
'11/10/19 : OKAMOTO	Correct warning: " / * " within comment
'11/08/26 : OKAMOTO Update to "MN88472_Device_Driver_110823".
'11/08/12 : OKAMOTO Implement IF 4.5MHz for DVB-T/T2 7MHz.
'11/08/05 : OKAMOTO Correct slave addr in "DMD_trans_reg".
'11/08/05 : OKAMOTO Update to "MN88472_Device_Driver_110802"
'11/08/01 : OKAMOTO	Implement I2C read / write handler.
'11/08/01 : OKAMOTO	Correct Error.
					(This error was corrected in "MN88472_Device_Driver_110823".)
'11/07/29 : OKAMOTO	Update to "MN88472_Device_Driver_110715"
----------------------------------------------------
Copyright(C) 2011 SHARP CORPORATION			
******************************************************/


#ifndef DMD_MN88472_H
#define DMD_MN88472_H

#ifdef __cplusplus
extern "C" {
#endif

/* **************************************************** */
/* MN88472 Demodulator Infomation */
/* **************************************************** */


extern DMD_ERROR_t	DMD_472_information_dvbt( DMD_PARAMETER_t *param , DMD_u32_t id);
extern DMD_ERROR_t	DMD_472_information_dvbt2( DMD_PARAMETER_t *param , DMD_u32_t id);
extern DMD_ERROR_t	DMD_472_information_dvbc( DMD_PARAMETER_t *param , DMD_u32_t id);

/* **************************************************** */
/* Register Setting Array */
/* **************************************************** */
extern DMD_I2C_Register_t	MN88472_REG_COMMON[];
extern DMD_I2C_Register_t	MN88472_REG_DVBT2_7MHZ[];
extern DMD_I2C_Register_t	MN88472_REG_DVBT_6MHZ[];
extern DMD_I2C_Register_t	MN88472_REG_DVBT_7MHZ[];
extern DMD_I2C_Register_t	MN88472_REG_DVBT2_6MHZ[];
extern DMD_I2C_Register_t	MN88472_REG_DVBT2_8MHZ[];
extern DMD_I2C_Register_t	MN88472_REG_DVBT2_5MHZ[];
extern DMD_I2C_Register_t	MN88472_REG_DVBT2_1_7MHZ[];
extern DMD_I2C_Register_t	MN88472_REG_DVBC[];
extern DMD_I2C_Register_t	MN88472_REG_DVBT_8MHZ[];
extern DMD_u8_t				MN88472_REG_AUTOCTRL[];
extern DMD_u32_t			MN88472_REG_AUTOCTRL_SIZE;

/* **************************************************** */
/* I2C Register Name */
/* **************************************************** */

/* '11/08/01 : OKAMOTO	Implement I2C read / write handler. */
#if 0
#define DMD_BANK_T2_	0x1c
#define DMD_BANK_T_  	0x18
#define DMD_BANK_C_		0x1a

#define DMD_BANK_1st	0x1c
#define DMD_BANK_2nd  	0x18
#define DMD_BANK_3rd	0x1a

/* '11/08/05 : OKAMOTO Correct slave addr in "DMD_trans_reg". */
/*
#else
#define DMD_BANK_T2_	(MN88472_CMN_slave_address_get(DMD_E_DVBT2))
#define DMD_BANK_T_  	(MN88472_CMN_slave_address_get(DMD_E_DVBT))
#define DMD_BANK_C_		(MN88472_CMN_slave_address_get(DMD_E_DVBC))

#define DMD_BANK_1st	(MN88472_CMN_slave_address_get(DMD_E_DVBT2))
#define DMD_BANK_2nd  	(MN88472_CMN_slave_address_get(DMD_E_DVBT))
#define DMD_BANK_3rd	(MN88472_CMN_slave_address_get(DMD_E_DVBC))
*/
#endif

//BANK	name		addr	bit length	default	option
#define DMD_PLLSET1		0x0
#define DMD_PLLSET2		0x1
#define DMD_PLLSET		0x2
#define DMD_DTVSET		0x3
#define DMD_SYSSET		0x4
#define DMD_PWDSET		0x5
#define DMD_SPWDSET1	0x6
#define DMD_SPWDSET2	0x7
#define DMD_TSSET1		0x8
#define DMD_TSSET2		0x9
#define DMD_PLDWSET		0xA
#define DMD_HIZSET1		0xB
#define DMD_HIZSET2		0xC
#define DMD_GPIOSET		0xD
#define DMD_OUTSET1		0xE
#define DMD_OUTSET2		0xF
#define DMD_NCOFREQU	0x10
#define DMD_NCOFREQM	0x11
#define DMD_NCOFREQL	0x12
#define DMD_FADU		0x13
#define DMD_FADM		0x14
#define DMD_FADL		0x15
#define DMD_FSFTXU		0x16
#define DMD_FSFTXL		0x17
#define DMD_FSFTYU		0x18
#define DMD_FSFTYL		0x19
#define DMD_SSEQSET		0x1A
#define DMD_SSEQSTSET	0x1B
#define DMD_SSPRESET	0x1C
#define DMD_STTOSET1	0x1D
#define DMD_STTOSET2	0x1E
#define DMD_STTOSET3	0x1F
#define DMD_STTOSET4	0x20
#define DMD_SSEQTAU1	0x21
#define DMD_SSEQTAU2	0x22
#define DMD_UNLCKSET	0x23
#define DMD_FEFSET		0x24
#define DMD_WINSET1		0x25
#define DMD_WINSET2		0x26
#define DMD_WINPOSU		0x27
#define DMD_WINPOSL		0x28
#define DMD_WAFCSET1	0x29
#define DMD_WAFCSET2	0x2A
#define DMD_WAFCSET3	0x2B
#define DMD_CPESET		0x2C
#define DMD_TPSET1		0x2D
#define DMD_TPSET2		0x2E
#define DMD_DETSET		0x2F
#define DMD_FECSET1		0x30
#define DMD_FECSET2		0x31
#define DMD_PLPID		0x32
#define DMD_STMDSET1	0x33
#define DMD_STMDSET2	0x34
#define DMD_STMDSET3	0x35
#define DMD_STENSET1	0x36
#define DMD_STENSET2	0x37
#define DMD_P1SET1		0x38
#define DMD_P1SET2		0x39
#define DMD_P1SET3		0x3A
#define DMD_P1SET4		0x3B
#define DMD_TSYNCSET1	0x3C
#define DMD_TSYNCSET2	0x3D
#define DMD_TSYNCSET3	0x3E
#define DMD_DFCSET1		0x3F
#define DMD_DFCSET2		0x40
#define DMD_DFCSET3		0x41
#define DMD_DFSSET1		0x42
#define DMD_DFSSET2		0x43
#define DMD_DFSSET3		0x44
#define DMD_ANBICSET1	0x45
#define DMD_ANBICSET2	0x46
#define DMD_COFILSET	0x47
#define DMD_PHTHL		0x48
#define DMD_ICISET		0x49
#define DMD_WAFCSET4	0x4A
#define DMD_WAFCSET5	0x4B
#define DMD_ISISET1		0x4C
#define DMD_ISISET2		0x4D
#define DMD_ISISET3		0x4E
#define DMD_DETSET2		0x4F
#define DMD_DETSET3		0x50
#define DMD_DETQCSET	0x51
#define DMD_ADPTSET		0x52
#define DMD_DETIMPSET1	0x53
#define DMD_DETIMPSET2	0x54
#define DMD_DETIMPTH	0x55
#define DMD_DETNSELTH	0x56
#define DMD_DETRMVTH	0x57
#define DMD_ICICWSET	0x58
#define DMD_CSISET		0x59
#define DMD_CPECTSET	0x5A
#define DMD_FFILSET1	0x5B
#define DMD_FFILSET2	0x5C
#define DMD_FFSDTU		0x5D
#define DMD_FFSDTL		0x5E
#define DMD_WPSRCSET1	0x5F
#define DMD_WPSRCSET2	0x60
#define DMD_CFIWAIT		0x61
#define DMD_CFICNTL		0x62
#define DMD_CFIGAIN		0x63
#define DMD_CFIOSET		0x64
#define DMD_CFIOCG		0x65
#define DMD_CFIBLEND	0x66
#define DMD_CFIMONSET1	0x67
#define DMD_CFIMONSET2	0x68
#define DMD_CFIREFMANU	0x69
#define DMD_CFIREFMANL	0x6A
#define DMD_DINTSET1	0x6B
#define DMD_DINTSET2	0x6C
#define DMD_DINTSET3	0x6D
#define DMD_DMPSET1		0x6E
#define DMD_DMPSET2		0x6F
#define DMD_DMPSET3		0x70
#define DMD_CSICOEF1	0x71
#define DMD_CSICOEF2	0x72
#define DMD_LLRSET1		0x73
#define DMD_LLRSET2		0x74
#define DMD_LDPCSET		0x75
#define DMD_LDITMAX1	0x76
#define DMD_LDITMAX2	0x77
#define DMD_LDITMAX3	0x78
#define DMD_LDITMAX4	0x79
#define DMD_TSFSET1		0x7A
#define DMD_TSFSET2		0x7B
#define DMD_TSFSET3		0x7C
#define DMD_TSFSET4		0x7D
#define DMD_TSFCLKSET	0x7E
#define DMD_TSFCLKDT	0x7F
#define DMD_TSFFLGSET	0x80
#define DMD_TSFDBGSET	0x81
#define DMD_TSFDBGRD	0x82
#define DMD_AGCRDSET	0x83
#define DMD_SYN1RDSET	0x84
#define DMD_SYN2RDSET	0x85
#define DMD_ISIRDSET	0x86
#define DMD_DETRDSET1	0x87
#define DMD_DETRDSET2	0x88
#define DMD_CNSET		0x89
#define DMD_BERSET		0x8A
#define DMD_BERLEN		0x8B
#define DMD_NERRFSET	0x8C
#define DMD_AGCFLG		0x8D
#define DMD_AGCRDU		0x8E
#define DMD_AGCRDL		0x8F
#define DMD_DAGCRD		0x90
#define DMD_IMPRD		0x91
#define DMD_SSEQFLG		0x92
#define DMD_SSEQRD1		0x93
#define DMD_SSEQRD2		0x94
#define DMD_P1FLG		0x95
#define DMD_CL1RD		0x96
#define DMD_DL1RD		0x97
#define DMD_L1POSRD		0x98
#define DMD_SYN1FLG		0x99
#define DMD_SYN2FLG		0x9A
#define DMD_DETFLG		0x9B
#define DMD_FECFLG		0x9C
#define DMD_TSFLG		0x9D
#define DMD_TSFFLG		0x9E
#define DMD_TSSTATUS	0x9F
#define DMD_P1RDU		0xA0
#define DMD_P1RDL		0xA1
#define DMD_SYN1RDU		0xA2
#define DMD_SYN1RDL		0xA3
#define DMD_SYN2RDU		0xA4
#define DMD_SYN2RDL		0xA5
#define DMD_ISIRDU		0xA6
#define DMD_ISIRDL		0xA7
#define DMD_DETRDU		0xA8
#define DMD_DETRDM		0xA9
#define DMD_DETRDL		0xAA
#define DMD_CFIMON1RD	0xAB
#define DMD_CFIMON2RD	0xAC
#define DMD_TDIRDU		0xAD
#define DMD_TDIRDL		0xAE
#define DMD_TDISTRDU	0xAF
#define DMD_TDISTRDL	0xB0
#define DMD_CDIRDU		0xB1
#define DMD_CDIRDL		0xB2
#define DMD_LDRD		0xB3
#define DMD_FECCHRD1	0xB4
#define DMD_FECCHRD2	0xB5
#define DMD_TSFRDU		0xB6
#define DMD_TSFRDM		0xB7
#define DMD_TSFRDL		0xB8
#define DMD_DJBRDU		0xB9
#define DMD_DJBRDM		0xBA
#define DMD_DJBRDL		0xBB
#define DMD_CNFLG		0xBC
#define DMD_CNRDU		0xBD
#define DMD_CNRDL		0xBE
#define DMD_BERFLG		0xBF
#define DMD_BERRDU		0xC0
#define DMD_BERRDM		0xC1
#define DMD_BERRDL		0xC2
#define DMD_ERRFLG		0xC3
#define DMD_TPDSET1		0xC4
#define DMD_TPDSET2		0xC5
#define DMD_TPD1		0xC6
#define DMD_TPD2		0xC7
#define DMD_TPD3		0xC8
#define DMD_TPD4		0xC9
#define DMD_TPD5		0xCA
#define DMD_TPD6		0xCB
#define DMD_TPD7		0xCC
#define DMD_TPD8		0xCD
#define DMD_PRESET1		0xCE
#define DMD_PRESET2		0xCF
#define DMD_PRESET3		0xD0
#define DMD_PRESET4		0xD1
#define DMD_PRESET5		0xD2
#define DMD_DOSET1		0xD3
#define DMD_DOSET2		0xD4
#define DMD_DOSET3		0xD5
#define DMD_FLGSET_X	0xD6
#define DMD_FLGSET_T	0xD7
#define DMD_FLGSET_C	0xD8
#define DMD_FLGSET		0xD9
#define DMD_INVSET		0xDA
#define DMD_INTSET		0xDB
#define DMD_INTDEF1_X	0xDC
#define DMD_INTDEF2_X	0xDD
#define DMD_IFLGSET1_X	0xDE
#define DMD_IFLGSET2_X	0xDF
#define DMD_INTDEF1_T	0xE0
#define DMD_INTDEF2_T	0xE1
#define DMD_IFLGSET1_T	0xE2
#define DMD_IFLGSET2_T	0xE3
#define DMD_INTDEF1_C	0xE4
#define DMD_INTDEF2_C	0xE5
#define DMD_IFLGSET_C	0xE6
#define DMD_INTCND		0xE7
#define DMD_INTST		0xE8
#define DMD_GPOSET		0xE9
#define DMD_GPDTU		0xEA
#define DMD_GPDTL		0xEB
#define DMD_TCBSET		0xEC
#define DMD_TCBRT		0xED
#define DMD_TCBADR		0xEE
#define DMD_TCBDT0		0xEF
#define DMD_TCBDT1		0xF0
#define DMD_TCBDT2		0xF1
#define DMD_TCBDT3		0xF2
#define DMD_TCBDT4		0xF3
#define DMD_TCBDT5		0xF4
#define DMD_TCBDT6		0xF5
#define DMD_TCBDT7		0xF6
#define DMD_TCBCOM		0xF7
#define DMD_RSTSET1		0xF8
#define DMD_RSTSET2		0xF9
#define DMD_RSTSET3		0xFA
#define DMD_I2CSET		0xFB
#define DMD_PSEQOP1		0xFC
#define DMD_PSEQOP2		0xFD
#define DMD_PSEQCOM		0xFE
#define DMD_CHIPRD		0xFF

//BANK	name		addr	bit length	default	option
#define DMD_MDSET_T		0x0
#define DMD_MDASET_T	0x1
#define DMD_MDDEF0_T	0x2
#define DMD_MDDEF1_T	0x3
#define DMD_MDDEF2_T	0x4
#define DMD_SSEQSTSET_T	0x5
#define DMD_STTOSET1_T	0x6
#define DMD_STTOSET2_T	0x7
#define DMD_STTOSET3_T	0x8
#define DMD_SSEQTAU1_T	0x9
#define DMD_SSEQTAU2_T	0xA
#define DMD_SSEQTAU3_T	0xB
#define DMD_MGSET_T		0xC
#define DMD_MGDTH_T		0xD
#define DMD_WINSET1_T	0xE
#define DMD_WINSET2_T	0xF
#define DMD_TPSET_T		0x10
#define DMD_FRMSET_T	0x11
#define DMD_SPSYNCSET_T	0x12
#define DMD_DETSET_T	0x13
#define DMD_FECSET1_T	0x14
#define DMD_FECSET2_T	0x15
#define DMD_RSDSET_T	0x16
#define DMD_MFECSET_T	0x17
#define DMD_TSFSET_T	0x18
#define DMD_STMDSET1_T	0x19
#define DMD_STMDSET2_T	0x1A
#define DMD_STENSET1_T	0x1B
#define DMD_STENSET2_T	0x1C
#define DMD_TSYNCSET1_T	0x1D
#define DMD_TSYNCSET2_T	0x1E
#define DMD_TSYNCSET3_T	0x1F
#define DMD_TSYNCSET4_T	0x20
#define DMD_DFCSET1_T	0x21
#define DMD_DFCSET2_T	0x22
#define DMD_DFCSET3_T	0x23
#define DMD_DFCSET4_T	0x24
#define DMD_DFCSET5_T	0x25
#define DMD_DFSSET1_T	0x26
#define DMD_DFSSET2_T	0x27
#define DMD_DFSSET3_T	0x28
#define DMD_DFSSET4_T	0x29
#define DMD_DTSET1_T	0x2A
#define DMD_DTSET2_T	0x2B
#define DMD_DTSET3_T	0x2C
#define DMD_DTSET4_T	0x2D
#define DMD_DTSET5_T	0x2E
#define DMD_ANBICSET1_T	0x2F
#define DMD_ANBICSET2_T	0x30
#define DMD_COFILSET_T	0x31
#define DMD_SYMTCNT_T	0x32
#define DMD_PHTHL_T		0x33
#define DMD_OFLKSET_T	0x34
#define DMD_OFDMTHL_T	0x35
#define DMD_OFDMTHH_T	0x36
#define DMD_JMPTHR1_T	0x37
#define DMD_JMPTHR2_T	0x38
#define DMD_IIRSET_T	0x39
#define DMD_ICISET_T	0x3A
#define DMD_SYMSTSET_T	0x3B
#define DMD_FGAINSET_T	0x3C
#define DMD_CPEQESET_T	0x3D
#define DMD_DETSET2_T	0x3E
#define DMD_DETSET3_T	0x3F
#define DMD_DETQCSET_T	0x40
#define DMD_ADPTSET_T	0x41
#define DMD_CSISET_T	0x42
#define DMD_ICICWSET_T	0x43
#define DMD_ICICWSET2_T	0x44
#define DMD_FFILSET1_T	0x45
#define DMD_FFILSET2_T	0x46
#define DMD_FFSDT_T		0x47
#define DMD_WPSRCSET1_T	0x48
#define DMD_WPSRCSET2_T	0x49
#define DMD_WPCSET_T	0x4A
#define DMD_WPCDT_T		0x4B
#define DMD_CPISET_T	0x4C
#define DMD_MPTHU_T		0x4D
#define DMD_MPTHM_T		0x4E
#define DMD_MPTHL_T		0x4F
#define DMD_CPICLPA_T	0x50
#define DMD_CPICLPB_T	0x51
#define DMD_CPICLPC_T	0x52
#define DMD_CPICLPD_T	0x53
#define DMD_CPICLPE_T	0x54
#define DMD_CPICLPF_T	0x55
#define DMD_CFISET1_T	0x56
#define DMD_CFISET2_T	0x57
#define DMD_CFISET3_T	0x58
#define DMD_CFIOCTHU_T	0x59
#define DMD_CFIOCTHL_T	0x5A
#define DMD_CFIOCGU_T	0x5B
#define DMD_CFIOCGM_T	0x5C
#define DMD_CFIOCGL_T	0x5D
#define DMD_CPSFSET1_T	0x5E
#define DMD_CPSFSET2_T	0x5F
#define DMD_CFICLPVAL_T	0x60
#define DMD_CWDETTH_T	0x61
#define DMD_DMPSET1_T	0x62
#define DMD_DMPSET2_T	0x63
#define DMD_CLPRNK1_T	0x64
#define DMD_CLPRNK2_T	0x65
#define DMD_CLPRNK3_T	0x66
#define DMD_CLPRNK4_T	0x67
#define DMD_CLPRNK5_T	0x68
#define DMD_CLPRNK6_T	0x69
#define DMD_COCHSET1_T	0x6A
#define DMD_COCHSET2_T	0x6B
#define DMD_COCHSET3_T	0x6C
#define DMD_TFECDLY1_T	0x6D
#define DMD_TFECDLY2_T	0x6E
#define DMD_TFECDLY3_T	0x6F
#define DMD_SYN1RDSET_T	0x70
#define DMD_SYN2RDSET_T	0x71
#define DMD_ISIRDSET_T	0x72
#define DMD_DETRDSET1_T	0x73
#define DMD_DETRDSET2_T	0x74
#define DMD_CNSET_T		0x75
#define DMD_CNASET_T	0x76
#define DMD_CNBSET_T	0x77
#define DMD_BERSET1_T	0x78
#define DMD_BERSET2_T	0x79
#define DMD_BERSET3_T	0x7A
#define DMD_BERSTSET_T	0x7B
#define DMD_NERRFSET_T	0x7C
#define DMD_BERRDSET_T	0x7D
#define DMD_MDRD_T		0x7E
#define DMD_SSEQRD_T	0x7F
#define DMD_SYN1FLG_T	0x80
#define DMD_SYN2FLG_T	0x81
#define DMD_DETFLG_T	0x82
#define DMD_FECFLG_T	0x83
#define DMD_SYN1RDU_T	0x84
#define DMD_SYN1RDL_T	0x85
#define DMD_SYN2RDU_T	0x86
#define DMD_SYN2RDL_T	0x87
#define DMD_TMCCD1_T	0x88
#define DMD_TMCCD2_T	0x89
#define DMD_TMCCD3_T	0x8A
#define DMD_TMCCD4_T	0x8B
#define DMD_TMCCD5_T	0x8C
#define DMD_TMCCD6_T	0x8D
#define DMD_TMCCD7_T	0x8E
#define DMD_TMCCD8_T	0x8F
#define DMD_CELLIDU_T	0x90
#define DMD_CELLIDL_T	0x91
#define DMD_DVBH_SIG_T	0x92
#define DMD_ISIRDU_T	0x93
#define DMD_ISIRDL_T	0x94
#define DMD_DETRDU_T	0x95
#define DMD_DETRDM_T	0x96
#define DMD_DETRDL_T	0x97
#define DMD_MPRD_T		0x98
#define DMD_CWRD_T		0x99
#define DMD_CSIRD_T		0x9A
#define DMD_CNFLG_T		0x9B
#define DMD_CNRDU_T		0x9C
#define DMD_CNRDL_T		0x9D
#define DMD_BERFLG_T	0x9E
#define DMD_BERRDU_T	0x9F
#define DMD_BERRDM_T	0xA0
#define DMD_BERRDL_T	0xA1
#define DMD_BERLENRDU_T	0xA2
#define DMD_BERLENRDL_T	0xA3
#define DMD_ERRFLG_T	0xA4
#define DMD_CTSET1_T	0xA5
#define DMD_CTSET2_T	0xA6
#define DMD_CTRDU_T		0xA7
#define DMD_CTRDL_T		0xA8
#define DMD_BERSET1_P_T	0xA9
#define DMD_BERSET2_P_T	0xAA
#define DMD_BERRDSET_P_T	0xAB
#define DMD_BERRD_P_T	0xAC
#define DMD_CLKSET1		0xAE
#define DMD_CLKSET2		0xAF
#define DMD_ADCSET1		0xB0
#define DMD_ADCSET2		0xB1
#define DMD_ADCSET3		0xB2
#define DMD_ADCSET4		0xB3
#define DMD_AGCREF		0xB4
#define DMD_AGCSET1		0xB5
#define DMD_AGCSET2		0xB6
#define DMD_AGCLFGDA	0xB7
#define DMD_AGCLFGIA	0xB8
#define DMD_AGCLFGDS	0xB9
#define DMD_AGCLFGIS	0xBA
#define DMD_AGCLFSET1	0xBB
#define DMD_AGCLFSET2	0xBC
#define DMD_AGCLFSET3	0xBD
#define DMD_AGCWD1		0xBE
#define DMD_AGCWD2		0xBF
#define DMD_AGCFLGSET1	0xC0
#define DMD_AGCFLGSET2	0xC1
#define DMD_UNDERTHR	0xC2
#define DMD_OVERTHR		0xC3
#define DMD_AGCDB1		0xC4
#define DMD_AGCDB2		0xC5
#define DMD_AGCDB3		0xC6
#define DMD_AGCV0RF		0xC7
#define DMD_AGCV0IF		0xC8
#define DMD_AGCV1		0xC9
#define DMD_AGCV2		0xCA
#define DMD_AGCV3		0xCB
#define DMD_DCCSET		0xCC
#define DMD_IMPSET		0xCD
#define DMD_MGAINSET	0xCE
#define DMD_MIPFSET		0xCF
#define DMD_FDLY1		0xD0
#define DMD_FDLY2		0xD1
#define DMD_TDAGCSET	0xD2
#define DMD_TDAGCREF	0xD3
#define DMD_FDAGCSET	0xD4
#define DMD_FDAGCREF	0xD5
#define DMD_TGAINSET	0xD6
#define DMD_FFTSET		0xD7
#define DMD_FFTGSET		0xD8
#define DMD_FIFOSET		0xD9
#define DMD_PKTFSET		0xDA
#define DMD_PKTFRATE	0xDB
#define DMD_PKTFOFS		0xDC
#define DMD_DOFSET		0xDD
#define DMD_PERSET		0xDE
#define DMD_PERLEN		0xDF
#define DMD_PERFLG		0xE0
#define DMD_PERRDU		0xE1
#define DMD_PERRDL		0xE2
#define DMD_PERLENRDU	0xE3
#define DMD_PERLENRDL	0xE4
#define DMD_PKTFRD		0xE5
#define DMD_CTSET		0xE6
#define DMD_CTCARU		0xE7
#define DMD_CTCARL		0xE8
#define DMD_CTRDU		0xE9
#define DMD_CTRDL		0xEA
#define DMD_TESTSET1	0xEC
#define DMD_TESTSET2	0xED
#define DMD_TESTSET3	0xEE
#define DMD_I2CSET_T	0xEF
#define DMD_PSEQCTRL	0xF0
#define DMD_PSEQOP1_T	0xF1
#define DMD_PSEQOP2_T	0xF2
#define DMD_PSEQOP3_T	0xF3
#define DMD_PSEQOP4_T	0xF4
#define DMD_PSEQSET		0xF5
#define DMD_PSEQPRG		0xF6
#define DMD_PSEQDBG		0xF7
#define DMD_PSEQFLG		0xF8
#define DMD_PSEQADRU	0xF9
#define DMD_PSEQADRL	0xFA
#define DMD_PSEQDTSET	0xFB
#define DMD_PSEQDT		0xFC
#define DMD_PSEQTBASE	0xFD
#define DMD_PSEQCOM_T	0xFE
#define DMD_CHIPRD_T	0xFF

//BANK	name		addr	bit length	default	option
#define DMD_CHSRCHSET_C	0x00
#define DMD_SSEQSTSET_C	0x01
#define DMD_SRCHSET1_C	0x02
#define DMD_SRCHSET2_C	0x03
#define DMD_SRCHSET3_C	0x04
#define DMD_SSEQRSTSET1_C	0x05
#define DMD_SSEQRSTSET2_C	0x06
#define DMD_STTOSET_C	0x07
#define DMD_NCOSTEPU_C	0x08
#define DMD_NCOSTEPM_C	0x09
#define DMD_NCOSTEPL_C	0x0A
#define DMD_FRMTOSET0_C	0x0B
#define DMD_FRMTOSET1_C	0x0C
#define DMD_FRMTOSET2_C	0x0D
#define DMD_FRMTOSET3_C	0x0E
#define DMD_FRMTOSET4_C	0x0F
#define DMD_BAUDTHRU_C	0x10
#define DMD_BAUDTHRL_C	0x11
#define DMD_BAUDMAXU_C	0x12
#define DMD_BAUDMAXL_C	0x13
#define DMD_BAUDMINU_C	0x14
#define DMD_BAUDMINL_C	0x15
#define DMD_BAUDGAPU_C	0x16
#define DMD_BAUDGAPL_C	0x17
#define DMD_SRATEIN1_C	0x18
#define DMD_SRATEIN2_C	0x19
#define DMD_SRATEIN3_C	0x1A
#define DMD_SRATEIN4_C	0x1B
#define DMD_RATE1U_C	0x1C
#define DMD_RATE1L_C	0x1D
#define DMD_RATE2U_C	0x1E
#define DMD_RATE2L_C	0x1F
#define DMD_FSFTSET1_C	0x20
#define DMD_FSFTSET2_C	0x21
#define DMD_FSFTSET3_C	0x22
#define DMD_SYNCSET1_C	0x23
#define DMD_SYNCSET2_C	0x24
#define DMD_CAFCTHR_C	0x25
#define DMD_RATE3U_C	0x26
#define DMD_RATE3L_C	0x27
#define DMD_RATE4U_C	0x28
#define DMD_RATE4L_C	0x29
#define DMD_PASB1_C		0x2A
#define DMD_PASB2_C		0x2B
#define DMD_PASB3_C		0x2C
#define DMD_PASB4_C		0x2D
#define DMD_RATESET1_C	0x2E
#define DMD_RATESET2_C	0x2F
#define DMD_RATESET3_C	0x30
#define DMD_RATESET4_C	0x31
#define DMD_RATESET5_C	0x32
#define DMD_DMDPRM1_C	0x33
#define DMD_DMDPRM2_C	0x34
#define DMD_DMDPRM3_C	0x35
#define DMD_DMDPRM4_C	0x36
#define DMD_DMDPRM5_C	0x37
#define DMD_DMDPRM6_C	0x38
#define DMD_DMDPRM7_C	0x39
#define DMD_DMDPRM8_C	0x3A
#define DMD_DMDPRM9_C	0x3B
#define DMD_DMDPRM10_C	0x3C
#define DMD_DMDPRM11_C	0x3D
#define DMD_DMDPRM12_C	0x3E
#define DMD_DMDPRM13_C	0x3F
#define DMD_DMDPRM14_C	0x40
#define DMD_DMDPRM15_C	0x41
#define DMD_DMDPRM16_C	0x42
#define DMD_ERRCNT1_C	0x43
#define DMD_ERRCNT2_C	0x44
#define DMD_ERRCNT3_C	0x45
#define DMD_ERRCNT4_C	0x46
#define DMD_ERRCNT5_C	0x47
#define DMD_ERRCNT6_C	0x48
#define DMD_ERRCNT7_C	0x49
#define DMD_ERRCNT8_C	0x4A
#define DMD_ERRCNT9_C	0x4B
#define DMD_ERRCNT10_C	0x4C
#define DMD_ERRCNT11_C	0x4D
#define DMD_ERRCNT12_C	0x4E
#define DMD_ERRCNT13_C	0x4F
#define DMD_ERRCNT14_C	0x50
#define DMD_QCAFCADD2U_C	0x51
#define DMD_QCAFCADD2L_C	0x52
#define DMD_QCAFCSET1_C	0x53
#define DMD_QCAFCSET2_C	0x54
#define DMD_QCAFCSET3_C	0x55
#define DMD_QCAFCSET4_C	0x56
#define DMD_QCAFCSET5_C	0x57
#define DMD_QCAFCSET6_C	0x58
#define DMD_QCAFCSET7_C	0x59
#define DMD_QCAFCSET8_C	0x5A
#define DMD_GMIN_C		0x5B
#define DMD_QDAGCREF_C	0x5C
#define DMD_DAGCCOQ_C	0x5D
#define DMD_AFCSET1_C	0x5E
#define DMD_AFCCO_C		0x5F
#define DMD_AFCADD_C	0x60
#define DMD_APCSET1_C	0x61
#define DMD_APCSET2_C	0x62
#define DMD_APCSET4_C	0x63
#define DMD_APCSET5_C	0x64
#define DMD_APCCO1_C	0x65
#define DMD_APCCO2_C	0x66
#define DMD_APCCO3_C	0x67
#define DMD_APCCO4_C	0x68
#define DMD_CKRCO1_C	0x69
#define DMD_CKRCO2_C	0x6A
#define DMD_CKRSET1_C	0x6B
#define DMD_CKRSET2_C	0x6C
#define DMD_CKRLDFBN_C	0x6D
#define DMD_CKRLDTH_C	0x6E
#define DMD_CKRLDSET_C	0x6F
#define DMD_PNTSET_C	0x70
#define DMD_PNTCO_C		0x71
#define DMD_QDETSET1_C	0x72
#define DMD_QDETSET2_C	0x73
#define DMD_EQSET_C		0x74
#define DMD_QEQSET_C	0x75
#define DMD_QDETREF_C	0x76
#define DMD_PIRETH3U_C	0x77
#define DMD_PIRETH3L_C	0x78
#define DMD_NRFRSEL_C	0x79
#define DMD_CMFSET10_C	0x7A
#define DMD_DAGCSET_C	0x7B
#define DMD_VDAGCREF_C	0x7C
#define DMD_EQMNSET_C	0x80
#define DMD_CNSET_C		0x81
#define DMD_IBTGSET_C	0x82
#define DMD_SSEQMON1_C	0x83
#define DMD_SSEQMON2_C	0x84
#define DMD_STSMON_C	0x85
#define DMD_RATERDU_C	0x86
#define DMD_RATERDM_C	0x87
#define DMD_RATERDL_C	0x88
#define DMD_DMDSTSMON1_C	0x89
#define DMD_DMDSTSMON2_C	0x8A
#define DMD_AFCMON1_C	0x8B
#define DMD_AFCMON2_C	0x8C
#define DMD_AFCMON3_C	0x8D
#define DMD_AFCMON4_C	0x8E
#define DMD_CKRMON1_C	0x8F
#define DMD_CKRMON2_C	0x90
#define DMD_CKRMON3_C	0x91
#define DMD_APCMON1_C	0x92
#define DMD_APCMON2_C	0x93
#define DMD_APCMON3_C	0x94
#define DMD_APCMON4_C	0x95
#define DMD_PNTMON1_C	0x96
#define DMD_PNTMON2_C	0x97
#define DMD_PNTMON3_C	0x98
#define DMD_PNTMON4_C	0x99
#define DMD_DAGCMON1_C	0x9A
#define DMD_DAGCMON2_C	0x9B
#define DMD_IMON1_C		0x9C
#define DMD_IMON2_C		0x9D
#define DMD_QMON1_C		0x9E
#define DMD_QMON2_C		0x9F
#define DMD_CNFLG_C		0xA0
#define DMD_CNMON1_C	0xA1
#define DMD_CNMON2_C	0xA2
#define DMD_CNMON3_C	0xA3
#define DMD_CNMON4_C	0xA4
#define DMD_RATEMON_C	0xA5
#define DMD_FILMON_C	0xA6
#define DMD_AFCMON_C	0xA7
#define DMD_CKRMON_C	0xA8
#define DMD_APCMON_C	0xA9
#define DMD_PNTMON_C	0xAA
#define DMD_DAGCMON_C	0xAB
#define DMD_IMON_C		0xAC
#define DMD_QMON_C		0xAD
#define DMD_QCAFCCNT_C	0xAE
#define DMD_CKRFEMON_C	0xAF
#define DMD_EQERR1_C	0xB0
#define DMD_EQERR2_C	0xB1
#define DMD_EQCOEF_C	0xB2
#define DMD_APCERR_C	0xB3
#define DMD_PNTERR_C	0xB4
#define DMD_CNFLGP_C	0xB5
#define DMD_CNMON1P_C	0xB6
#define DMD_CNMON2P_C	0xB7
#define DMD_CNMON3P_C	0xB8
#define DMD_CNMON4P_C	0xB9
#define DMD_DAT_TTO_OFFSETU	0xF0
#define DMD_DAT_TTO_OFFSETM	0xF1
#define DMD_DAT_TTO_OFFSETL	0xF2
#define DMD_COM_TTO_OFFSETU	0xF3
#define DMD_COM_TTO_OFFSETM	0xF4
#define DMD_COM_TTO_OFFSETL	0xF5
#define DMD_FECSET3		0xF6
#define DMD_I2CSET		0xFB
#define DMD_PSEQOP1_C	0xFC
#define DMD_PSEQOP2_C	0xFD
#define DMD_PSEQCOM_C	0xFE
#define DMD_CHIPRD_C	0xFF

#ifdef __cplusplus
}
#endif
#endif
